<template>
	<view class="y-page-common page">
		<view class="card form">
			<cell title='申请人手机号码' mode="input" v-model="formData.phoneNo" required></cell>
			<cell title='经常居住地地址' mode="region" v-model="formData.adress" required></cell>
			<cell title='详细地址' mode="input" v-model="formData.adressDetail" required></cell>
			<cell title='身份证有效期' mode="date" v-model="formData.IDCardValidity" required></cell>			
			<cell title='申请人婚姻状况' mode="selector"  :selectorItem= 'selectorItem' v-model="formData.isMarry" required></cell>
			<cell title='紧急联系人' mode="input" v-model="formData.emergencyContactor" required></cell>
			<cell title='紧急联系人电话' mode="input" v-model="formData.emergencyContactorNo" required></cell>
			<cell title='从业年限' mode="input" v-model="formData.workYear" required></cell>
			<cell title='企业名称' mode="input" v-model="formData.companyName" ></cell>
			<cell title='统一社会信用代码' mode="input" v-model="formData.creditNo"></cell>
			<cell title='期望贷款金额(万元)' mode="input" v-model="formData.needBorrow" required></cell>
		</view>
		<view class="btns">
			<ReadmeBtn :readme="[]" fixed="true" text="提交" @submit="jumpTo"></ReadmeBtn>
		</view>
		
	</view>

	</view>
</template>

<script>
	import cell from "@/components/cell.vue"
	export default {
		components: {
			cell
		},
		data() {
			return {
				formData: {
					phoneNo: '136 **** ****',
					adress: '成都市 锦江区',
					adressDetail: 'xxxx路12号',
					IDCardValidity: '2099-08-18',
					isMarry: '2',
					emergencyContactor: '李四',
					emergencyContactorNo: '188 **** ****',
					workYear: '12',
					companyName: '成都XX农业科技公司',
					creditNo: '123',
					needBorrow: '12',
					
				},
				selectorItem: [{
										value: '1',
										label: '未婚'
									},
									{
										value: '2',
										label: '已婚'
									},
								],
			}
		},
		onLoad() {

		},
		methods: {
			jumpTo() {
				uni.showToast({
					icon: "none",
					title: '提交成功',
					duration: 3000,
					position: 'top'
				})
				uni.setStorageSync('isInsertInfo', true);
				uni.navigateTo({
					url: '/pages/personal/limit'
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.page {
		width: 100%;
		height: 100%;
		position: absolute;

		.form {
			margin-bottom: 200rpx;
		}
		.tips {
			padding: 30rpx;
		}
		.btns {
			display: flex;
		}
	}
</style>